// OUTDOOR SCRIPT
//    Out 0,0: Valzakov Forest

beginoutdoorscript;

variables;

short choice;

body;

beginstate INIT_STATE;

break;


beginstate EXIT_STATE;

break;


beginstate START_STATE;

break;


beginstate 10;

if ((get_sdf(110,0) == 1) && (get_sdf(1,0) == 0)) {
 set_flag(1,0,1);
 message_dialog("Klinger looks at a subtle marking on one of the trees.","_According to this, we should head west from here. Asmur is due northwest. I've never actually traveled this route, but others were nice enough to leave markings._");
}

break;

beginstate 11;

if ((get_sdf(110,0) == 1) && (get_sdf(1,1) == 0)) {
 set_flag(1,1,1);
 message_dialog("_To the west is one of the villages that was wiped out by Arivan. All those who were 'inadequate' or refused to join were slaughtered. Many who escaped joined the resistance from this place._","_From here we should go north and try to veer west slightly. Be careful. Arivan likely has scouts out here. We are not too far from Vikida, and as we near Asmur. We need to watch for hostile soldiers._");
}

break;


beginstate 12;

if ((get_sdf(110,0) == 1) && (get_sdf(1,2) == 0)) {
 set_flag(1,2,1);
 message_dialog("_There! We've almost made it and without too much trouble. Once we get there, keep a very low profile. The people here, they are quite paranoid of outsiders. They will especially not trust you._","_We should probably head to the main structure on the north side of the village as quickly as possible. We don't need any undeserved trouble._");
}

break;


beginstate 13;

message_dialog("This village, much like the one you first encountered, was burned to the ground and all of the residents were killed. All that remains is an eerie skeleton of a once-happy, small Nephilim tribe.","You leave this carnage behind, wondering what would cause anyone to commit such a repulsive act.");

break;


beginstate 14;

if ((get_sdf(1,6) == 0) && (get_sdf(110,1) == 1)) {
 set_flag(1,6,1);
 message_dialog("Valzier turns to Klinger. _We need to take these scrolls to the Resistance. What is the best way to get there?_","");
}

break;


beginstate 15;

if ((get_sdf(1,6) == 1) && (get_sdf(110,1) == 1)) {
 set_flag(1,6,2);
 message_dialog("Klinger responds, _I fear it is very far. The forest will take us very near Vikida. In light of the recent attack, I would wager there are soldiers all around. Also, sneaking a group through there will not be easy._","Valzier begins to think.");
}

break;


beginstate 16;

if ((get_sdf(1,6) == 2) && (get_sdf(110,1) == 1)) {
 set_flag(1,6,3);
 message_dialog("_Perhaps there is another way._ Valzier looks through the scrolls. Klinger looks carefully. It appears to be a map of the surrounding area. Valzier points to one of the circles on the map.","_There! Long ago, Asmur managed to build several teleportation platforms. They are risky, but no more so than the route you describe. It can take us past Vikida. What say you Klinger?_");
 message_dialog("Klinger considers the options. _How confident are you these will work?_ Valzier responds, _They have not been used in some time, but, from what I've been told, they worked quite efficiently._","Klinger ponders. _If you say they will work, I say we take them._ He looks at the map. _From here we need to head almost due east to reach the nearest one. Let's go!_");
}

break;


beginstate 17;

message_dialog("You are approached by a group of patroling Vikida soldiers. Upon seeing you, they look alarmed at the strangers before them. They have probably never seen humans before.","Unfortunately, the typical way to respond to fear is with hostility. They attack!");

break;


beginstate 18;

reset_dialog();
 add_dialog_str(0,"A small detachment of undead guard this passage. There is no indication of why they are here or what they are guarding. The only way to find out is to hack through them.",0);
 add_dialog_choice(0,"Fight them!");
 add_dialog_choice(1,"Back away.");
 choice = run_dialog(1);
 if (choice == 1)
  message_dialog("You draw your weapons. As you approach, the simple-minded creatures lumber toward you.","");
 if (choice == 2) {
  outdoor_enc_result(1);
  message_dialog("You decide not to challenge the supernatural today.","");
 }

break;


beginstate 19;

reset_dialog();
 add_dialog_str(0,"A small Nephilim village lies ahead. As you approach, the friendly residents hesitantly welcome you in. They tell you all about the success of the last hunt, a recent marriage, and all sorts of trivia.",0);
 add_dialog_str(1,"Before you leave, one of the more industrious Nephilim tries to offer to sell some of her goods.",0);
 add_dialog_choice(0,"Look at the goods.");
 add_dialog_choice(1,"Leave.");
 choice = run_dialog(1);
 if (choice == 1)
  begin_shop_mode("Nephil Goods","On your visit to an isolated Nephilim village, one of them offers to trade her assorted items with you.",6,2,4);
 if (choice == 2) {
  message_dialog("You decide that you do not need anything. The Nephilim looks somewhat disappointed. After a few goodbyes, you depart.","");
 }

break;


beginstate 20;

if (get_sdf(2,13) == 0) {
 reset_dialog();
  add_dialog_str(0,"You enter this lush glade and find a whole bunch of herbs with various alchemical properties! This is a very rare find indeed and they are yours for the picking.",0);
  add_dialog_choice(0,"Pick the herbs.");
  add_dialog_choice(1,"Leave.");
  choice = run_dialog(1);
  if (choice == 1) {
   reward_give(214);
   reward_give(215);
   reward_give(216);
   set_flag(2,13,1);
   message_dialog("You pick the herbs. It will be a long time before they grow back. You will probably be long off the island by then.","");
  }
  if (choice == 2)
   end();
}

break;


beginstate 21;

if (get_sdf(2,14) == 0) {
 reset_dialog();
  add_dialog_str(0,"You discover the body of a Nephilim. He was recently slain and stripped of all equipment. You notice, however, that whoever killed him missed a small silver ring.",0);
  add_dialog_str(1,"If you want it, it would easily be yours. He does not need it anymore.",0);
  add_dialog_choice(0,"Take the ring.");
  add_dialog_choice(1,"Leave.");
  choice = run_dialog(1);
  if (choice == 1) {
   reward_give(270);
   set_flag(2,14,1);
   message_dialog("You take the ring off the corpse's finger. You feel a bit queasy about robbing the dead, but you manage to get over it anyway.","");
  }
  if (choice == 2)
   end();
}

break;